;;; early-init.el ---   -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(when (or (featurep 'esup-child) ;;if emacs startup profiler is provided
          (fboundp 'profile-dotemacs) ;; function is defined
          (daemonp) ;; run as daemon
          (boundp 'startup-now) ;; variable is not nil
          noninteractive)
  (setq package-enable-at-startup nil))

;; Prevent unwanted runtime compilation for gccemacs (native-comp) users;
;; packages are compiled ahead-of-time when they are installed and site files
;; are compiled when gccemacs is installed.
(setq native-comp-deferred-compilation nil ;; obsolete since 29.1
      native-comp-jit-compilation nil)

(setq inhibit-startup-message t)

;; no menu bar, toolbar, scroll bar
;; Faster to disable these here (before they've been initialized)
(push '(menu-bar-lines . 0) default-frame-alist)
(push '(tool-bar-lines . 0) default-frame-alist)
(push '(vertical-scroll-bars) default-frame-alist)
(push '(horizontal-scroll-bars) default-frame-alist)

(setq-default mode-line-format nil)

;; Inhibit resizing frame
(setq frame-inhibit-implied-resize t)

;; `use-package' is builtin since 29.
;; It must be set before loading `use-package'.
(setq use-package-enable-imenu-support t)

;; In noninteractive sessions, prioritize non-byte-compiled source files to
;; prevent the use of stale byte-code. Otherwise, it saves us a little IO time
;; to skip the mtime checks on every *.elc file.
(setq load-prefer-newer noninteractive)

(provide 'early-init)
;;; early-init.el ends here

